Optimal. Leaf size=64 \[ \frac{a^2 (c x)^{m+1}}{c (m+1)}+\frac{2 a b x^{n+1} (c x)^m}{m+n+1}+\frac{b^2 x^{2 n+1} (c x)^m}{m+2 n+1} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0334044, antiderivative size = 64, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 3, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {270, 20, 30} \[ \frac{a^2 (c x)^{m+1}}{c (m+1)}+\frac{2 a b x^{n+1} (c x)^m}{m+n+1}+\frac{b^2 x^{2 n+1} (c x)^m}{m+2 n+1} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 270
Rule 20
Rule 30
Rubi steps
\begin{align*} \int (c x)^m \left (a+b x^n\right )^2 \, dx &=\int \left (a^2 (c x)^m+2 a b x^n (c x)^m+b^2 x^{2 n} (c x)^m\right ) \, dx\\ &=\frac{a^2 (c x)^{1+m}}{c (1+m)}+(2 a b) \int x^n (c x)^m \, dx+b^2 \int x^{2 n} (c x)^m \, dx\\ &=\frac{a^2 (c x)^{1+m}}{c (1+m)}+\left (2 a b x^{-m} (c x)^m\right ) \int x^{m+n} \, dx+\left (b^2 x^{-m} (c x)^m\right ) \int x^{m+2 n} \, dx\\ &=\frac{2 a b x^{1+n} (c x)^m}{1+m+n}+\frac{b^2 x^{1+2 n} (c x)^m}{1+m+2 n}+\frac{a^2 (c x)^{1+m}}{c (1+m)}\\ \end{align*}
Mathematica [A] time = 0.0366014, size = 47, normalized size = 0.73 \[ x (c x)^m \left (\frac{a^2}{m+1}+\frac{2 a b x^n}{m+n+1}+\frac{b^2 x^{2 n}}{m+2 n+1}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.047, size = 234, normalized size = 3.7 \begin{align*}{\frac{ \left ({b}^{2}{m}^{2} \left ({x}^{n} \right ) ^{2}+{b}^{2}mn \left ({x}^{n} \right ) ^{2}+2\,ab{m}^{2}{x}^{n}+4\,abmn{x}^{n}+2\,m{b}^{2} \left ({x}^{n} \right ) ^{2}+{b}^{2}n \left ({x}^{n} \right ) ^{2}+{a}^{2}{m}^{2}+3\,{a}^{2}mn+2\,{a}^{2}{n}^{2}+4\,mab{x}^{n}+4\,abn{x}^{n}+{b}^{2} \left ({x}^{n} \right ) ^{2}+2\,m{a}^{2}+3\,{a}^{2}n+2\,a{x}^{n}b+{a}^{2} \right ) x}{ \left ( 1+m \right ) \left ( m+n+1 \right ) \left ( 1+m+2\,n \right ) }{{\rm e}^{{\frac{m \left ( -i \left ({\it csgn} \left ( icx \right ) \right ) ^{3}\pi +i \left ({\it csgn} \left ( icx \right ) \right ) ^{2}{\it csgn} \left ( ic \right ) \pi +i \left ({\it csgn} \left ( icx \right ) \right ) ^{2}{\it csgn} \left ( ix \right ) \pi -i{\it csgn} \left ( icx \right ){\it csgn} \left ( ic \right ){\it csgn} \left ( ix \right ) \pi +2\,\ln \left ( x \right ) +2\,\ln \left ( c \right ) \right ) }{2}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.3744, size = 417, normalized size = 6.52 \begin{align*} \frac{{\left (b^{2} m^{2} + 2 \, b^{2} m + b^{2} +{\left (b^{2} m + b^{2}\right )} n\right )} x x^{2 \, n} e^{\left (m \log \left (c\right ) + m \log \left (x\right )\right )} + 2 \,{\left (a b m^{2} + 2 \, a b m + a b + 2 \,{\left (a b m + a b\right )} n\right )} x x^{n} e^{\left (m \log \left (c\right ) + m \log \left (x\right )\right )} +{\left (a^{2} m^{2} + 2 \, a^{2} n^{2} + 2 \, a^{2} m + a^{2} + 3 \,{\left (a^{2} m + a^{2}\right )} n\right )} x e^{\left (m \log \left (c\right ) + m \log \left (x\right )\right )}}{m^{3} + 2 \,{\left (m + 1\right )} n^{2} + 3 \, m^{2} + 3 \,{\left (m^{2} + 2 \, m + 1\right )} n + 3 \, m + 1} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.18254, size = 828, normalized size = 12.94 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]